
// Copyright (C) Recursion Company. All rights reserved.

#ifndef __VOL_WTL_UI_HYPERLINK_H__
#define __VOL_WTL_UI_HYPERLINK_H__

class IHyperLinkEventListener : public IBaseEventListener
{
public:
    virtual BOOL OnGoto (const TCHAR* szURL) = 0;
};

class CVWnd_HyperLink : public CWindowImpl<CVWnd_HyperLink>
{
    BEGIN_DECLARE_VOL_NATIVE_WND_CLASS (CVWnd_HyperLink, IHyperLinkEventListener, FALSE)
        MSG_WM_LBUTTONDOWN (OnLButtonDown)
        MSG_WM_MOUSEMOVE (OnMouseMove)
        MSG_WM_PAINT (OnPaint)
        MSG_WM_SETFONT (OnSetFont)
    END_DECLARE_VOL_NATIVE_WND_CLASS_NOT_CONTAINER ()

protected:
    void OnLButtonDown (UINT nFlags, CPoint point);
    void OnMouseMove (UINT nFlags, CPoint point);
    void OnPaint (HDC hDCNotUsed);
    void OnSetFont (CFontHandle font, BOOL bRedraw);

public:
    CVWnd_HyperLink ();
    BOOL GotoURL ();

public:
	INT m_nType;
	CVolString m_strEmail, m_strURL;
	COLORREF m_clrLink, m_clrVisited, m_clrHover, m_clrBack;

protected:
	BOOL m_blOverControl, m_bVisited;
    CFont m_fntDraw;
};

#endif
